package com.community.controller;

import com.community.pojo.Address;
import com.community.service.IAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author heyuhang
 * @create 2024/6/18
 */
@CrossOrigin
@Controller
@RequestMapping("/community/address")
public class AddressController {

    @Autowired
    private IAddressService addressService;

    @RequestMapping("/list3")
    @ResponseBody
    public List<Address> productList3() {
        return addressService.list();
    }
}
